-
-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Fix compatibility with php 8.4 and newer ImageMagick library versions #704
fix: Fix compatibility with php 8.4 and newer ImageMagick library versions #704
Conversation
Not sure if this is related to this PR or not, but I'm unable to install the latest imagick extension (with IM 6) in a PHP8.4 docker container:
because this is not explicitly nullable: |
This PR is one of the fixes for compatibility with PHP 8.4, but it is not directly related to your issue. Your issue is related to the Imagick.stub.php file, which was fixed in the develop branch six months ago but has not yet been included in an official release. You are currently using the PECL official release, where this fix is not available yet. Commit with the fix: Commit Link. You can install any development version of Imagick using COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
RUN install-php-extensions https://api.github.com/repos/michalananapps/imagick/tarball/cd0bc8f4269ee3845b2cc216f5555dc2a676712b This command will install the version from the specified commit. However, you must ensure that you only install it from trusted sources. The example above uses the current commit of this PR's source branch. Use it at your own risk. 😊 |
Awesome, thanks for the info---I didn't know this tool existed! It looks like PHP 8.4 support for imagick is built into the tool so you can just use: ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN install-php-extensions imagick |
@Danack could you look at this PR? thank you |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please split the CI (including util/calculate_cflags.php
) and version check to two PR's? Please also remove the imagick.c changes as they are already merged. They are independent.
@@ -610,7 +610,7 @@ static zval *php_imagick_read_property(zend_object *object, zend_string *member, | |||
if (format) { | |||
retval = rv; | |||
ZVAL_STRING(retval, format); | |||
php_strtolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); | |||
zend_str_tolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those replacements are already merged to develop so please remove them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bukka First of all, I wanted to say that I'm really happy that you took care of this project :). As for the split, I can do it, but some of the changes related to CI require modifications that are part of the version check. I'll first submit a PR with the version check and then another one for CI with the newer PHP versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool thanks. Or if it's easier, you can just split it to two commits and push force it here...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also please rebase on the latest develop - I pushed few commits to fix build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bukka is there a plan to drop PHP5.4 and PHP5.5 support?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bukka is there a plan to drop PHP5.4 and PHP5.5 support?
Yeah I want to actually drop them and keep just 5.6 for the next release. Then I would like to drop PHP 5 support completely in the following release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very nice to hear you guys getting Imagick into shape again! But honestly, why not drop any EOL version, anything below PHP 8.1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are long term support commercial plans and some distros keep it longer so currently the oldest supported version that I'm aware of is 7.2 but think 7.0 and 7.1 don't really cost much extra in terms of maintanence so I don't really mind to keep those if they just work in pipeline. The 5.6 got some updates and dropping the support should be also done with clean up which would delay the next release so that's why I want to do it in the follow up version.
#716 is merged so closing this |
No description provided.